package cn.kbyue.security.service;

import cn.kbyue.security.entity.KbUser;
import org.springframework.stereotype.Service;

/**
 * @author xlang
 * @version 0.0.1
 * @date 2021/9/15 10:13
 */
@Service
public class UserService {

    public KbUser findByName(String name) {
        if ("admin".equals(name)) {
            KbUser user = new KbUser();
            user.setId(1);
            user.setUserId("10001");
            user.setAccount("admin");
            // 123456
            user.setPassword("$2a$10$VvQO5NorWi2j7J8zaRzr8undlvMVD6R4KvTr6QyGujcinRDgSLOBG");
            user.setStatus(0);
            return user;
        }
        return null;
    }

}
